<?php
/*
 * Created on Sep 7, 2007
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
if($_COOKIE['home'] == 'Home') {
	//$_COOKIE['prevPage'] = 'ViewBox';
} else {
	//$_COOKIE['prevPage'] = 'AdminEditBox';
}
require('./View/Security.php');
require('./Controller/GetValues.php');
require('./Model/SpecalizedInserts.php');
require('./View/ViewFunctions.php');
$query = "SELECT  FROM FrozenTube WHERE ID=" .$_GET['id'];
//gets the id if its posted or if its in the URL
$id = getID($_GET['id'], $_POST['id']);
$containerID = $_GET['ContainerID'];
//runs insert on another table before making lists.
$result = selectFromDatabase(array('CellTypeID', 'FrozenByID', 'FrozenDate', 
	'ModifiedByID', 'PassageFrozen', 'Note', 'NumberFrozen'), 
	'FrozenTube',array('ID' => $id));
$line = mysql_fetch_array($result, MYSQL_ASSOC);

$search ="id=" . $_GET['id'] . "&" .makeSearchLink($_GET);
?>
<HTML>
<HEAD>
<TITLE>Modify A Tube</TUBE>
</HEAD>

<BODY>
<?php echo searchButton($_GET); ?></br>
<b><?php echo getTubeLocation($id); ?></b>
<?php if(isset($_COOKIE['User']) | isset($_COOKIE['Helper'])): ?>
<form name="UpdateBox" action="Update.php?<?php echo $search; ?>" onsubmit="return validate_form(this)" method="POST">
<?php if($_COOKIE['home'] == 'Home'): ?>
	<input type="hidden" name="foward" value="ModifyTube.php">
<?php else: ?>
	<input type='hidden' name="foward" value="ModifyTube.php"> <!-- in case i decide I want different links later -->
<?php endif; ?>
<?php endif; ?>
</br>
<table>
</table>
<?php //if(isset($_COOKIE['Guest']) | isset($_COOKIE['User'])): ?>
	
	<?php require('./View/ViewTube.php') ?>
	
<?php if(isset($_COOKIE['Helper']) | $_COOKIE['Admin']): ?>
<hr />
	Modify Tube: </br>
	<?php require('./View/ModifyTubeGeneric.php'); ?>
<?php endif; ?>
<?php if(isset($_COOKIE['Helper'])): ?>
<input style="height: 50px; width: 200px" type="submit" name="change" value="Update">
</form>
<?php endif; ?>
</br>
<?php makeBackButton() ?>
</BODY>
<?php require('./View/Footer.php'); ?>
</HTML>
